home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 March / CHIP Mart 1997.iso / SurfCam / SURFCAM.Z / GENERIC.M3 < prev    next >
Text File  |  1996-04-01  |  5KB  |  197 lines

  1. name Generic 3 Axis Mill
  2.  
  3. % 00
  4. ! 00
  5. O 4
  6. N >4
  7. G 2
  8. g 2 G
  9. X ->3.>4
  10. Y ->3.>4
  11. Z ->3.>4
  12. I ->3.>4
  13. J ->3.>4
  14. R ->3.>4
  15. Q ->3.>4
  16. F >3.1
  17. H 2
  18. D 2
  19. T 2
  20. M 2
  21. S >4
  22.  
  23. ModalLetters X Y Z F R                # List of letters that are modal    
  24.  
  25. ModalGs 0 1 2 3 73 74 76 80 81 82 83 84 85  # List of g codes that are modal    
  26.  
  27. Sequence#s N 1 1 1                    # Char, freq, incr & start          
  28. First#? N                             # Y or N  'Output 1st sequence no.  
  29. Last#? N                              # Y or N  'Output last sequence no. 
  30.  
  31. HCode X                               # X or X U  'Horizontal char.       
  32. VCode Y                               # Y or Y V  'Vertical char.         
  33. Dcode Z                               # Depth char.                       
  34. FeedCode F                            # Feed rate char.                   
  35.  
  36. Comment ( )                           # Begin End comment char.           
  37.  
  38. Spindle 3 4 5                         # Cw, ccw & stop m codes            
  39. Coolant 8 9 7                         # On, Off & Mist m codes            
  40. DComp 41 42 40                        # Left, Right & Cancel m codes      
  41. LComp 43 49                           # On & Off codes                    
  42.  
  43. Feed G1                             # Linear move                       
  44. Rapid G0                            # Rapid positioning word            
  45. Cw G2                               # Circular move clockwise           
  46. Ccw G3                              # Circular move counter clockwise   
  47.  
  48. Inc/Abs G 91 90                       # Inc & Abs char. & values          
  49. Inch/MM 70 71                         # Inch & Metric g codes             
  50.  
  51. CtrCode I J                           # I J or R or I J K L               
  52. Helical? Y
  53.  
  54. CtrIncremental? Y                     # Y or N  'Inc or abs I & J         
  55. ByQuadrants? N                        # Y or N  'Break arcs at quadrants  
  56.  
  57. Spaces? Y                             # Y or N  'Spaces between words     
  58. Incremental? N                        # Y or N  'Inc or abs output        
  59.  
  60. Work G                                # Work offset register              
  61.  
  62. UppercaseComments? Y                  # Y or N 'Require uppercase comments
  63.  
  64. Drill                                 # Drilling canned/manual cycle      
  65. G81 X[H] Y[V] Z[D] R[Vclear] F[FRate]
  66. end cancel
  67.  
  68. Peck                                  # Pecking canned/manual cycle       
  69. G83 X[H] Y[V] Z[D] Q[VBite] R[Vclear] F[FRate]
  70. end cancel
  71.  
  72. Tap                                   # Tapping canned/manual cycle       
  73. G84 X[H] Y[V] Z[D] R[Vclear] F[FRate]
  74. end cancel
  75.  
  76. LTap                                  # Left handed tapping cycle         
  77. G74 X[H] Y[V] Z[D] R[Vclear] F[FRate]
  78. end cancel
  79.  
  80. Ream                                  # Reaming canned/manual cycle       
  81. G85 X[H] Y[V] Z[D] R[Vclear] F[FRate]
  82. end cancel
  83.  
  84. Bore                                  # Boring canned/manual cycle        
  85. G86 X[H] Y[V] Z[D] R[Vclear] F[FRate]
  86. end cancel
  87.  
  88. Back                                  # Back boring canned/manual cycle   
  89. G87 X[H] Y[V] Z[D] R[Vclear] F[FRate]
  90. end cancel
  91.  
  92. Cancel                                # Cancel a canned/manual cycle      
  93. G80
  94. end
  95.  
  96. StartCode                             # Start of the program              
  97. %0
  98. !0 O[Program#]
  99. End
  100.  
  101. 1stToolChange                         # First tool change                 
  102. G0 G90 G80 G40 G17
  103. T[Tool] M6
  104. M[Direct] S[Speed]
  105. G0 G[Work] X[H] Y[V]
  106. G43 Z[D] H[Lcomp]
  107. M[Cool]
  108. End
  109.  
  110. Infeed                                # Enable cutter comp                
  111. G[Side] X[H] Y[V] D[DComp] F[FRate]
  112. end
  113.  
  114. Outfeed                               # Disable cutter comp               
  115. G1 G40 X[H] Y[V]
  116. end
  117.  
  118. ToolChange                            # Secondary tool changes            
  119. M[CoolantOff]
  120. T[Tool] M6
  121. M[Direct] S[Speed]
  122. G0 X[H] Y[V]
  123. G43 Z[D] H[Lcomp]
  124. M[Cool]
  125. End
  126.  
  127. EndCode                               # End of the program                
  128. G0 g91 G28 Z0
  129. M30
  130. %0
  131. End
  132.  
  133.   #LineCode
  134.   #G1 X[H] Y[V] Z[D] F[FRate]
  135.   #End
  136.  
  137.   #RapidCode
  138.   #G0 X[H] Y[V] Z[D]
  139.   #End
  140.  
  141.   #CwCode
  142.   #G2 X[H] Y[V] I[IVal] J[JVal] F[FRate]
  143.   #End
  144.  
  145.   #CcwCode
  146.   #G3 X[H] Y[V] I[IVal] J[JVal] F[FRate]
  147.   #End
  148.  
  149.   #Custom1
  150.   #G81 X[H] Y[V] Z[D] R[Vclear] F[FRate]
  151.   #end cancel
  152.  
  153.   #Custom2
  154.   #G81 X[H] Y[V] Z[D] R[Vclear] F[FRate]
  155.   #end cancel
  156.  
  157.   #Custom3
  158.   #G81 X[H] Y[V] Z[D] R[Vclear] F[FRate]
  159.   #end cancel
  160.  
  161.   #SubStart
  162.   #O[Sub]
  163.   #End
  164.  
  165.   #SubEnd
  166.   #M99
  167.   #End
  168.  
  169.   #SubCall
  170.   #G[Work] P[Sub] M98
  171.   #End
  172.  
  173.   #Between
  174.   #M9
  175.   #g91 G80 G30 Y0 Z0
  176.   #G0 G40 G80 G90
  177.   #M30
  178.   #End
  179.  
  180.   #Index X
  181.   #G0 G28 g91 Z0
  182.   #G90 G[Work] X[H] Y[V] A[RotAngle]
  183.   #G43 H[Lcomp] Z[D]
  184.   #End
  185.  
  186.   #UnWind
  187.   #G0 G28 g91 Z0
  188.   #A0
  189.   #G43 Z[D] H[Lcomp] M[Cool]
  190.   #X[LastH] Y[LastV] A[LastRotAng]
  191.   #G1 Z[LastD]
  192.   #End
  193.  
  194.   #Upon RPlane
  195.   #Ask "Val1" " Enter 98 or 99 for canned cycles" "98"
  196.   #End
  197.